View Javadoc

1   // ObjectOutputStream.java, created Mon Jul  8  0:41:49 2002 by joewhaley
2   // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package joeq.ClassLib.Common.java.io;
5   
6   import joeq.Runtime.Unsafe;
7   import jwutil.util.Assert;
8   import jwutil.util.Convert;
9   
10  /***
11   * ObjectOutputStream
12   *
13   * @author  John Whaley <jwhaley@alum.mit.edu>
14   * @version $Id: ObjectOutputStream.java 1941 2004-09-30 03:37:06Z joewhaley $
15   */
16  public abstract class ObjectOutputStream {
17  
18      private static void floatsToBytes(float[] src, int srcpos, byte[] dst, int dstpos, int nfloats) {
19          --srcpos;
20          while (--nfloats >= 0) {
21              Convert.intToFourBytes(Unsafe.floatToIntBits(src[++srcpos]), dst, dstpos);
22              dstpos += 4;
23          }
24      }
25      private static void doublesToBytes(double[] src, int srcpos, byte[] dst, int dstpos, int ndoubles) {
26          --srcpos;
27          while (--ndoubles >= 0) {
28              Convert.longToEightBytes(Unsafe.doubleToLongBits(src[++srcpos]), dst, dstpos);
29              dstpos += 8;
30          }
31      }
32      private static void getPrimitiveFieldValues(java.lang.Object obj, long[] fieldIDs, char[] typecodes, byte[] data) {
33          Assert.TODO();
34      }
35      private static java.lang.Object getObjectFieldValue(java.lang.Object obj, long fieldID) {
36          Assert.TODO();
37          return null;
38      }
39      
40  }